<cd-modal [modalRef]="activeModal">
  <ng-container i18n
                class="modal-title">Purge Trash</ng-container>

  <ng-container class="modal-content">
    <form name="purgeForm"
          class="form"
          #formDir="ngForm"
          [formGroup]="purgeForm"
          novalidate>
      <div class="modal-body">
        <p>
          <ng-container i18n>To purge, select one or</ng-container>&nbsp;
          <kbd i18n>All</kbd>&nbsp;
          <ng-container i18n>pools and click</ng-container>&nbsp;
          <kbd i18n>Purge Trash</kbd>.&nbsp;
        </p>

        <div class="form-group">
          <label class="col-form-label mx-auto"
                 i18n>Pool:</label>
          <input class="form-control"
                 type="text"
                 placeholder="Pool name..."
                 i18n-placeholder
                 formControlName="poolName"
                 *ngIf="!poolPermission.read">
          <select id="poolName"
                  name="poolName"
                  class="form-control custom-select"
                  formControlName="poolName"
                  *ngIf="poolPermission.read">
            <option value=""
                    i18n>All</option>
            <option *ngFor="let pool of pools"
                    [value]="pool">{{ pool }}</option>
          </select>
        </div>
      </div>

      <div class="modal-footer">
        <cd-form-button-panel (submitActionEvent)="purge()"
                              [form]="purgeForm"
                              [submitText]="actionLabels.PURGE"></cd-form-button-panel>
      </div>
    </form>
  </ng-container>
</cd-modal>
